import urllib.request
import ssl
from bs4 import BeautifulSoup

ssl._create_default_https_context = ssl._create_unverified_context

url = "https://www.csdn.net/"

html = urllib.request.urlopen(url)

html = html.read()

html = html.decode()

# print(html)

soup = BeautifulSoup = BeautifulSoup(html, "html.parser")
lis = soup.select("span[class=title]")
for li in lis:
    print(li.text)